from django import forms

class LoginForm(forms.Form):
         
    email = forms.EmailField(max_length=100)
    password = forms.CharField(widget=forms.PasswordInput())
    
    def clean(self):
        cleaned_data = self.cleaned_data
        data = cleaned_data.items()
        if len(data) < 2:
            raise forms.ValidationError("Informe email e senha.")
        return cleaned_data
    